def options(opt):
	opt.load('compiler_cxx')
	opt.load('compiler_c')

def configure(conf):
	conf.load('compiler_cxx')
	conf.load('compiler_c')

def build(bld):
	bld.program(source='DynamicProg/main.cpp', target='DynamicProg/main')
	bld.program(source='Graph/main.cpp', target='Graph/main')
	bld.program(source='BitOprt/count1bits.cpp', target='BitOprt/countones')
	bld.program(source='BitOprt/bigsmallendian.cpp', target='BitOprt/bigorsmall')
	bld.program(source='Recursive/strfullperm/perm1.cc', target='Recursive/strfullperm/perm1')
	bld.program(source='Recursive/fullcomb/subsets.c', cflags='-std=c99 -Wall -g', target='Recursive/fullcomb/subsets')
	#bld.program(source='Tree/printTree.cpp', target='Tree/printTree')
	
	bld.program(source='Multithread/threadsync01.c', cflags='-std=c99 -Wall -g', linkflags='-lpthread', target='Multithread/threadsync01')
	bld.program(source='Multithread/basicthread1.c', cflags='-std=c99 -Wall -g', linkflags='-lpthread', target='Multithread/basicthread1')
	bld.program(source='Multithread/rwwithsemaphore.c', cflags='-std=c99 -Wall -g', linkflags='-lpthread', target='Multithread/rwwithsemaphore')
	bld.program(source='Multithread/mutex1.c', cflags='-std=c99 -Wall -g', linkflags='-lpthread', target='Multithread/mutex1')
	bld.program(source='Multithread/cond1.c', cflags='-std=c99 -Wall -g', linkflags='-lpthread', target='Multithread/cond1')
	#bld.program(source='Multithread/thread.cc', cflags='-std=c99 -Wall -g', linkflags='-lpthread', target='Multithread/thread')

	bld.stlib(source=['Multithread/pthreadwrapper/thread.cpp',
						'Multithread/pthreadwrapper/condition.cpp',
						'Multithread/pthreadwrapper/mutex.cpp',
						],
						cxxflags='-Wall -g',
						linkflags='-lpthread',
						target='Multithread/thread'
						)
	bld.program(source='Multithread/pthreadwrapper/testthread.cc', cflags='-Wall -g', linkflags='-lpthread', target='Multithread/testthread', use=['Multithread/thread'])

	#bld.program(source='quizes/BasicSingleListTest.cpp', target='basicsinglelisttest', includes=['srclibs'])
	#bld.program(source='quizes/singlelisttest.cpp', target='singlelisttest', includes=['srclibs'])
